Skip to content

Require 2FA for project and server deletion#123

Merged
arjunkomath merged 2 commits into
mainfrom
feat/2fa-project-server-delete
Jul 10, 2026
Merged

Require 2FA for project and server deletion#123
arjunkomath merged 2 commits into
mainfrom
feat/2fa-project-server-delete

Conversation

@techulus-agent

Copy link
Copy Markdown
Collaborator

Summary

  • require the existing TOTP step-up confirmation before project and server deletion
  • centralize server-side deletion confirmation across project, server, and service actions
  • reuse one client confirmation dialog while preserving resource-specific deletion behavior and service backup warnings
  • handle stale client sessions and validate the TOTP payload at the server boundary

Why

Project deletion cascades through services, so it could previously bypass the service-level 2FA confirmation. Server deletion also lacked the same destructive-action protection. This makes the policy consistent without changing accounts that do not have 2FA enabled.

Validation

  • Smart Review completed; diff-introduced findings addressed
  • Biome check passed
  • TypeScript --noEmit passed
  • focused Vitest passed: tests/two-factor.test.ts (5 tests)
  • git diff --check passed

Review note

The existing direct Better Auth TOTP throttling behavior is unchanged. This PR intentionally centralizes the currently merged service-delete policy without reintroducing the lockout implementation recently removed from main.

Related

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown

React Doctor found no new issues. 🎉

Reviewed by React Doctor for commit caac6b9.

@arjunkomath arjunkomath marked this pull request as ready for review July 10, 2026 08:14
@techulus-agent techulus-agent force-pushed the feat/2fa-project-server-delete branch from f0c09ed to 3f1a13d Compare July 10, 2026 11:36
@arjunkomath arjunkomath merged commit 6779951 into main Jul 10, 2026
8 checks passed
@arjunkomath arjunkomath deleted the feat/2fa-project-server-delete branch July 10, 2026 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants